package com.fub.guidance;

public class Point {
	private int x;
	private int y;
	private int z;

	/**
	 * Constructs a new Point.
	 * 
	 * @param x
	 *            the x position
	 * @param y
	 *            the y position
	 * @param z
	 *            the level of the node
	 */
	public Point(int x, int y, int z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}

	/**
	 * Return the x value of this point.
	 * 
	 * @return the x value of this point
	 */
	public int getX() {
		return this.x;
	}

	/**
	 * Returns the y value of this point.
	 * 
	 * @return the y value of this point
	 */
	public int getY() {
		return this.y;
	}

	/**
	 * Returns the level of this point.
	 * 
	 * @return the level of this point
	 */
	public int getZ() {
		return this.z;
	}

	/**
	 * Moves the point.
	 * 
	 * @param x
	 *            the x offset
	 * @param y
	 *            the y offset
	 */
	public void move(int x, int y) {
		this.x += x;
		this.y += y;
	}

	@Override
	public String toString() {
		return String.format("[%d,%d,%d]", this.x, this.y, this.z);
	}
}
